<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <meta name="viewport" charset="UTF-8" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" type="text/css" href="../static/css/me.css" th:href="@{/css/me.css}">
    <title>首页</title>
</head>
<body class="m-index-body">
    <!--顶部-->
    <div class="ui center aligned container">
        <h1 class="ui container">个人博客</h1>
    </div>
    <nav th:replace="_fragments :: menu(1)" class="ui inverted attached segment">
        <div class="ui container">
            <div class="ui inverted secondary menu stackable">
                <h2 class="ui teal header item center">Blog</h2>
                <a href="/index" class="m-item item m-mobile-hide active"><i class="home icon"></i>首页</a>
                <a href="/page_type" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
                <a href="/page_tag" class="m-item item m-mobile-hide"><i class="tag icon"></i>标签</a>
                <a href="/archives" class="m-item item m-mobile-hide"><i class="clone icon"></i>归档</a>
                <a href="/about" class="m-item item m-mobile-hide"><i class="info icon"></i>关于我</a>
                <div class="m-item item right">
                    <form action="/search" method="get">
                        <div class="ui action input inverted transparent">
                            <input type="text" name="title" placeholder="search...">
                            <button class="ui button icon" type="submit" value="search"><i class="search icon"></i></button>
                        </div>
                    </form>

                </div>
            </div>

        </div>
        <a href="#" class="menu toggle ui button black icon m-right-top m-mobile-show">
            <i class="sidebar icon"></i>
        </a>

    </nav><br><br><br>
    <!--中间-->
    <div >
        <div class="ui container">
            <div class="ui stackable grid">
                <div class="eleven wide column">
                    <!-- 左11格顶部 -->
                    <div class="ui top attached segment">
                        <div class="ui middle aligned two column grid">
                            <div class="column">
                                <h3 class="ui teal header">博客</h3>
                            </div>
                            <div class="right aligned column" >
                                共<h3 class="ui orange header m-inline-block" th:text="${page.total}+5">14</h3>篇
                            </div>
                        </div>
                    </div>
                    <!-- 左11格内容部分 -->
                    <div class="ui attached segment">
                        <div class="ui segment" th:each="blog : ${page}">
                            <div class="ui mobile reversed grid" >
                                <div class="eleven wide column">
                                    <h3 class="ui header" th:text="${blog.title}">你真的理解什么是财富自由吗？</h3>
                                    <p th:text="|${blog.digest}...|">正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>
                                    <div class="ui grid">
                                        <div class="eleven wide column">
                                            <div class="ui horizontal link list">
                                                <div class="item">
                                                    <img src="https://img2.baidu.com/it/u=1323281875,2980313329&fm=253&fmt=auto&app=138&f=JPEG?w=100&h=100"
                                                         alt="" class="ui avatar image">
                                                    <div class="content"><a href="#" class="ui teal">郑中拓</a></div>
                                                </div>
                                                <div class="item" th:text="${#dates.format(blog.pubTime,'yyyy-MM-dd')}">
                                                    <i class="calendar icon"></i>2022-08-03
                                                </div>
                                                <div class="item" >
                                                    <i class="eye icon"></i>[[${blog.views}]]
                                                </div>
                                            </div>
                                        </div>
                                        <div class="five wide column right aligned">
                                            <a href="#" target="_blank"
                                               class="ui basic teal label" th:text="${blog.columnist.colName}">认知升级</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="five wide column">
                                    <a href="#" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}">
                                        <img src="https://img2.baidu.com/it/u=1323281875,2980313329&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=400"
                                             th:src="${blog.homePagePhoto}" alt="" class="ui rounded image m-image-size">
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 左11格内容部分 -->
                    <div class="ui attached segment">
                        <div class="ui segment">
                            <div class="ui mobile reversed grid">
                                <div class="eleven wide column">
                                    <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                                    <p>正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>
                                    <div class="ui grid">
                                        <div class="eleven wide column">
                                            <div class="ui horizontal link list">
                                                <div class="item">
                                                    <img src="https://img2.baidu.com/it/u=1323281875,2980313329&fm=253&fmt=auto&app=138&f=JPEG?w=100&h=100" alt="" class="ui avatar image">
                                                    <div class="content"><a href="#" class="ui teal">郑中拓</a></div>
                                                </div>
                                                <div class="item">
                                                    <i class="calendar icon"></i>2022-08-03
                                                </div>
                                                <div class="item">
                                                    <i class="eye icon"></i>2243
                                                </div>
                                            </div>
                                        </div>
                                        <div class="five wide column right aligned">
                                            <a href="#" target="_blank" class="ui basic teal label">认知升级</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="five wide column">
                                    <a href="#" target="_blank">
                                        <img src="https://img2.baidu.com/it/u=1323281875,2980313329&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=400" alt="" class="ui rounded image">
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 左11格内容部分 -->
                    <div class="ui attached segment">
                        <div class="ui segment">
                            <div class="ui mobile reversed grid">
                                <div class="eleven wide column">
                                    <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                                    <p>正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>
                                    <div class="ui grid">
                                        <div class="eleven wide column">
                                            <div class="ui horizontal link list">
                                                <div class="item">
                                                    <img src="https://img2.baidu.com/it/u=1323281875,2980313329&fm=253&fmt=auto&app=138&f=JPEG?w=100&h=100" alt="" class="ui avatar image">
                                                    <div class="content"><a href="#" class="ui teal">郑中拓</a></div>
                                                </div>
                                                <div class="item">
                                                    <i class="calendar icon"></i>2022-08-03
                                                </div>
                                                <div class="item">
                                                    <i class="eye icon"></i>2243
                                                </div>
                                            </div>
                                        </div>
                                        <div class="five wide column right aligned">
                                            <a href="#" target="_blank" class="ui basic teal label">认知升级</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="five wide column">
                                    <a href="#" target="_blank">
                                        <img src="https://img2.baidu.com/it/u=1323281875,2980313329&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=400" alt="" class="ui rounded image">
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 左11格底部 -->
                    <div class="ui bottom attached segment">
                        <div class="ui middle aligned two column grid" th:if="${page.pages}>1">
                            <div class="column" th:unless="${page.pageNum}==1">
                                <a href="#" th:href="@{/index(page=${page.pageNum}-1)}" class="ui teal basic mini button">上一页</a>
                            </div>
                            <div class="right aligned column" th:unless="${page.pageNum}==${page.pages}">
                                <a href="#" th:href="@{/index(page=${page.pageNum}+1)}" class="ui teal basic mini button">下一页</a>
                            </div>
                        </div>
                    </div>
                </div>

                <!--右边分类、标签等内容-->
                <div class="five wide column">
                   <div class="ui segments">
                       <!--分类顶部header-->
                       <div class="ui secondary segment">
                           <div class="ui two column grid">
                               <div class="column">
                                   <i class="idea icon"></i>分类
                               </div>
                               <div class="column right aligned">
                                   <a href="#" th:href="@{types/-1}">more<i class="angle double right icon"></i></a>
                               </div>
                           </div>
                       </div>
                       <!--分类主体-->
                       <div class="ui segment">
                           <div class="ui fluid vertical menu" th:each="type:${types}">
                               <a href="#" th:href="@{/types/{id}(id=${type.id})}" class="item">[[${type.colName}]]
                                   <label class="ui teal basic left pointing label">[[${type.blogCount}]]</label>
                               </a>
                           </div>
                           <div class="ui fluid vertical menu">
                               <a href="#" class="item">学习日志
                                   <label class="ui teal basic left pointing label">13</label>
                               </a>
                           </div>
                       </div>
                       <!--标签header-->
                       <div class="ui segment">
                           <div class="ui two column grid">
                               <div class="column">
                                   <i class="tag icon"></i>标签
                               </div>
                               <div class="column right aligned">
                                   <a href="#" th:href="@{tags/-1}">more<i class="angle double right icon"></i></a>
                               </div>
                           </div>
                       </div>
                       <!--标签主体-->
                       <div class="ui teal segment">
                           <a href="#" th:each="tag:${tags}" th:href="@{/tags/{id}(id=${tag.id})}"
                              class="ui teal basic left pointing label m-margin-tb-tiny">
                               [[${tag.name}]]<div class="detail">[[${tag.blogCount}]]</div>
                           </a>
                           <a href="#" class="ui teal basic left pointing label m-margin-tb-tiny">
                               道<div class="detail">18</div>
                           </a>
                       </div>

                   </div>
                    <!--最新推荐-->
                    <div class="ui segments">
                        <!--最新推荐header-->
                        <div class="ui segment">
                            <i class="bookmark icon"></i>最新推荐
                        </div>
                        <!--推荐主体-->
                        <div class="ui segment" th:each="b:${blogs}">
                            <a href="#" th:href="@{/blog/{id}(id=${b.id})}" th:text="${b.title}"
                               class="item">用户故事 (user story)</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" class="item">用户故事 (user story)</a>
                        </div>

                    </div>
                    <!--二维码-->
                    <h4 class="ui horizontal divider header">扫码关注我</h4>
                    <div class="ui card centered" style="width: 11em">
                        <img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}" alt="" class="ui rounded image">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <br><br><br><br><br><br>
    <!--尾部-->
    <footer class="ui inverted vertical segment m-panded-tb-massive m-text-thin" th:fragment="footer">
        <div class="ui container">
            <!-- grid分成等级16份 -->
            <!-- divided分割线 -->
            <!-- ui center aligned container 所有的字体居中 -->
            <div class="ui center aligned container">
                <div class="ui stackable inverted divided grid">

                    <div class="three wide column">
                        <!-- rounded修饰图片圆角-->
                        <div class="item">
                            <img src="../../static/images/bonuscode.jpg" class="ui rounded image" alt="" style="width: 100px !important"> </div>

                    </div>

                    <div class="three wide column">

                        <h4 class="ui inverted header"> 最新博客</h4>
                        <div class="ui inverted link list">
                            <a href="#" class="item">用户故事(userstory)</a>
                            <a href="#" class="item">爱的艺术(love art)</a>
                            <a href="#" class="item">冥想的练习（meditation）</a>

                        </div>
                    </div>

                    <div class="three wide column">

                        <h4 class="ui inverted header "> 联系我</h4>
                        <div class="ui inverted link list">
                            <a href="#" class="item">E-mail 2282240015@qq.com</a>
                            <a href="#" class="item">电话17886977662</a>
                            <a href="#" class="item">微信(kind and still boy)</a>

                        </div>


                    </div>
                    <div class="seven wide column">

                        <h4 class="ui inverted header m-opacity-mini">TobeTangMonk</h4>

                        <p class="m-text-thin m-text-spaced m-opacity-mini">这个是我的个人博客，分享有关编程，思考，分享源代码，和个人生活中的点点滴滴的事情，我希望可以坚持一辈子写好博客,养成好的习惯，to be a kind and inteligent boy</p>

                    </div>

                </div>

                <!-- 分割线 ui-->
                <div class="ui  section teal divider"> <p class="m-text-spaced m-text-lined" style="color: white"> Copyright @2016-2017</p>


                </div>




            </div>
        </div>
    </footer>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>

<script>
    //移动端菜单处理
    $('.menu.toggle').click(function (){
        $('.m-item').toggleClass('m-mobile-hide')
    });
</script>
</body>
</html>